package com.bnyy.message;

import com.bnyy.common.ResponseData;
import com.bnyy.message.bean.ContactGroup;
import com.bnyy.message.bean.ContactUser;
import com.bnyy.message.bean.GroupChatActivity;
import com.bnyy.message.bean.GroupChatActivityDetail;
import com.bnyy.message.bean.GroupChatDetail;
import com.bnyy.message.bean.GroupChatSetting;
import com.bnyy.message.bean.GroupChatVote;
import com.bnyy.message.bean.GroupChatVoteDetail;
import com.bnyy.message.bean.NewChatGroup;
import com.bnyy.message.bean.RequestEnterChatGroupResult;
import com.bnyy.message.bean.chat.CreateGroupChatPermission;
import com.bnyy.message.bean.chat.message_data.VerificationMessage;
import com.bnyy.message.bean.chat.GroupChat;
import com.bnyy.message.bean.chat.OfflineChatMessage;

import java.util.ArrayList;

import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Author : 关炳鹏
 * Description :
 * Date : 2022/12/7
 **/
public interface MessageRetrofitService {
    /**
     * 获取新群聊列表
     * page_index 页数
     * page_size 每页条数
     * @return
     */
    @POST("app/chat/group/new_list")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<NewChatGroup>>> getNewGroupChats(@Body RequestBody requestBody);

    @POST("app/chat/group/member/enter")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<RequestEnterChatGroupResult>> requestEnterGroupChat(@Body RequestBody requestBody);

    // 创建群聊许可
    @POST("app/chat/group/add/premise")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<CreateGroupChatPermission>> createGroupChatPermission();

    // 创建群聊
    @POST("app/chat/group/add")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ContactGroup>> createGroupChat(@Body RequestBody requestBody);

    // 解散群聊
    @POST("app/chat/group/del")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> dismissGroupChat(@Body RequestBody requestBody);

    // 获取关注列表
    @POST("app/user/follows")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<ContactUser>>> getFocusList(@Body RequestBody requestBody);

    // 获取粉丝列表
    @POST("app/user/fans")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<ContactUser>>> getFansList(@Body RequestBody requestBody);

    // 获取好友列表
    @POST("app/chat/user/friend")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<ContactUser>>> getFriendList();

    // 获取群聊列表
    @POST("app/chat/group/list")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<ContactGroup>>> getGroupList();

    // 获取群聊设置
    @POST("app/chat/group/detail")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<GroupChatDetail>> getGroupChatDetail(@Body RequestBody requestBody);

    // 获取群聊详情
    @POST("app/chat/group/one")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<GroupChatSetting>> getGroupChatSetting(@Body RequestBody requestBody);

    // 获取家人列表
    @POST("app/chat/user/family")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<ContactUser>>> getFamilyList();

    //手表套餐提醒
    @POST("app/chat/group/member")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<GroupChat>>> getChatGroups(@Body RequestBody requestBody);

    // 获取未读聊天记录
    @POST("app/chat/offline_chat")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<OfflineChatMessage>>> getOffLineChatRecord(@Body RequestBody requestBody);

    // 确认未读聊天记录
    @POST("app/chat/offline_chat/confirm")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> confirmOffLineChatRecord(@Body RequestBody requestBody);

    // 删除群成员
    @POST("app/chat/group/member/del")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> removeGroupChatMember(@Body RequestBody requestBody);

    // 添加群成员
    @POST("app/chat/group/member/add")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> addGroupChatMember(@Body RequestBody requestBody);

    // 编辑群聊信息
    @POST("app/chat/group/update")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> editGroupChatSetting(@Body RequestBody requestBody);

    // 新增管理员
    @POST("app/chat/group/member/admin/add")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> addGroupChatManager(@Body RequestBody requestBody);

    // 编辑群聊信息
    @POST("app/chat/group/member/admin/del")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> removeGroupChatManager(@Body RequestBody requestBody);

    /**
     * (管理员)申请加入群聊验证
     * enter_id
     * status 状态 0:已申请(待处理) 1:同意 2:不同意
     */

    @POST("app/chat/group/member/enter/verify")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<VerificationMessage>> verify(@Body RequestBody requestBody);

    // 获取用户聊天详情
    @POST("app/chat/user/one")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ContactUser>> getPrivateChatSetting(@Body RequestBody requestBody);

    // 获取用户主页详情
    @POST("app/user/one")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ContactUser>> getUserHomepage(@Body RequestBody requestBody);

    // 编辑用户详情
    @POST("app/chat/user/update")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> editContactUser(@Body RequestBody requestBody);

    // 1 关注 / 2 取消关注
    @POST("app/user/relation/act")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> focusOrNot(@Body RequestBody requestBody);

    // 退出群聊
    @POST("app/chat/group/member/exit")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> exiteGroupChat(@Body RequestBody requestBody);

    // 获取群聊投票列表
    @POST("app/chat/group/vote/list")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<GroupChatVote>>> getGroupChatVoteList(@Body RequestBody requestBody);

    // 创建群聊投票
    @POST("app/chat/group/vote/add")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<GroupChatVote>> createGroupChatVote(@Body RequestBody requestBody);

    // 获取群聊投票详情
    @POST("app/chat/group/vote/one")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<GroupChatVoteDetail>> getGroupChatVoteDetail(@Body RequestBody requestBody);

    // 投票
    @POST("app/chat/group/vote/voting")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> GroupChatVoteVoting(@Body RequestBody requestBody);

    // 获取群聊活动列表
    @POST("app/chat/group/activity/list")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<GroupChatActivity>>> getGroupChatActivities(@Body RequestBody requestBody);

    // 创建群聊活动
    @POST("app/chat/group/activity/add")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<GroupChatVote>> createGroupChatActivity(@Body RequestBody requestBody);

    // 获取群聊活动详情
    @POST("app/chat/group/activity/one")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<GroupChatActivityDetail>> getGroupChatActivityDetail(@Body RequestBody requestBody);

    // 参与/退出 群聊活动
    @POST("app/chat/group/activity/activating")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> joinGroupChatActivity(@Body RequestBody requestBody);

    // 获取联系人
    @POST("app/user/new_friend/list")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<ContactUser>>> getChatContacts(@Body RequestBody requestBody);

    // 移除列表中的联系人
    @POST("app/user/new_friend/remove")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> removeChatContacts(@Body RequestBody requestBody);


}
